﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="shoppingcart.aspx.cs" Inherits="shoppingcart" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="css/shoppingcart.css" type="text/css" rel="Stylesheet" />
   
    <script type="text/javascript">
        var isHomePage = "false";
        $(document).ready(function () {
            $('.mainDiv').css({ position: "absolute", top: "36px" });
        }); 
    </script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="clearfix"></div>
    <div id="wrapper">
        <div id="sitemapath">
            <a href="#">Home</a>
        </div><!--End #sitemapath-->
        
        <div id="content">
            <div id="giohang">
                <div id="tieude">
                    <div id="icon"><span>GIỎ HÀNG</span></div><!---End #icon--->
                </div><!---End #tieude--->
                <div id="noidunggiohang">
                    <div id="container">
                        <asp:ScriptManager ID="ScriptManager1" runat="server">
                        </asp:ScriptManager>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate >
                                <asp:GridView ID="GVgiohang" runat="server" AutoGenerateColumns="False" 
                                    CellPadding="4" GridLines="None" Width="100%" OnRowCommand="GVgiohang_RowCommand"
                                    ShowFooter="True" DataKeyNames="masanpham" 
                                    OnRowDataBound="GVgiohang_RowDataBound" BorderStyle="None">
                                    <AlternatingRowStyle BackColor="White" BorderStyle="None" />
                                    <Columns >
                                        <asp:TemplateField HeaderText="Hình Sản Phẩm">
                                            <ItemTemplate>
                                                <a href="ProductDetail.aspx?masp=<%#Eval("Masanpham") %>">
                                                    <img src="ImagesProduct/<%#Eval("hinh") %>" alt="<%#Eval("Tensanpham") %>" style="border: 1px solid #e0e0e0"
                                                        width="100px" height="100px" /></a>
                                                <br />
                                                <asp:Button ID="bt_xoa" runat="server" Text="Xóa" CommandArgument='<%# Eval("Masanpham") %>'
                                                    CommandName="xoa" OnClientClick="return confirm('Bạn có chắc muốn xóa sản phẩm này trong giỏ hàng')" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="Tensanpham" HeaderText="Tên Sản Phẩm" />
                                        <asp:TemplateField HeaderText="Số lượng">
                                            <FooterTemplate>
                                                <table class="style1" width="100%">
                                                    <tr>
                                                        <td align="right" width="50%">
                                                            <asp:Label ID="Label1" runat="server" Text="Tổng Số Mặt Hàng "></asp:Label>
                                                        </td>
                                                        <td width="50%">
                                                            <asp:Label ID="lb_mathang" runat="server" Text="Label"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" width="50%">
                                                            <asp:Label ID="Label3" runat="server" Text="Tổng Tiền"></asp:Label>
                                                        </td>
                                                        <td width="50%">
                                                            <asp:Label ID="tongtien" runat="server" Text="Label"></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </FooterTemplate>
                                            <ItemTemplate >
                                                <asp:TextBox ID="So_luong" onfocus="this.style.backgroundColor = '#fff';this.style.border='1px solid #0F75BE'" onblur="this.style.backgroundColor = 'White'"   runat="server" Text='<%# Eval("So_luong") %>' 
                                                    Width="30px" ToolTip="Số lượng sản phẩm này bạn cần mua" 
                                                    CssClass="textbox"></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="Giaban" HeaderText="Giá Bán" DataFormatString="{0:#,##0 VND}">
                                            <ItemStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="thanh_tien" HeaderText="Thành Tiền" DataFormatString="{0:#,##0 VND}">
                                            <ItemStyle Font-Bold="True" ForeColor="Red" />
                                        </asp:BoundField>
                                    </Columns>
                                    <FooterStyle BackColor="#0F75BE" Font-Bold="True" ForeColor="White" 
                                        BorderStyle="None" />
                                    <HeaderStyle BackColor="#0F75BE" Font-Bold="True" ForeColor="White" 
                                        BorderStyle="None" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" 
                                        BorderStyle="None" />
                                    <RowStyle BackColor="#EFF3FB" BorderStyle="None" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" 
                                        BorderStyle="None" />
                                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                </asp:GridView>
                                <div id="btchucnang">
                                    <div id="muatiep">
                                        <%--<a href="ProductDetail.aspx" class="thanhtoan">Tiếp tục mua hàng</a>--%>

                                        <asp:Button ID="bt_muatiep" CssClass="bt_thanhtoan" runat="server" 
                                            Text="Mua tiếp" BorderStyle="None" onclick="bt_muatiep_Click" />
                                    </div>
                                    <div id="capnhatgiohang">
                                        <asp:Button ID="bt_capnhat"  CssClass="bt_thanhtoan" runat="server" 
                                            Text="Cập nhật giỏ hàng"  OnClick="bt_capnhat_Click" 
                                            OnClientClick="return alert('Cập nhật thành công')" BorderStyle="None" />
                                      <%--  <asp:ImageButton ID="bt_capnhat" runat="server" ImageUrl="~/images/capnhat_giohang.jpg"
                                            OnClick="bt_capnhat_Click" OnClientClick="return alert('Cập nhật thành công')" />--%>
                                     </div>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </div><!---End #noidunggiohang--->
            </div><!---End #giohang--->
            <div class="clearfix"></div>
            <div id="loaihinhtt">
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                        <div id="bt">
                             <asp:Button ID="thuchientt" runat="server" Text="Thực Hiện Thanh Toán"  
                                 onclick="thuchientt_Click" BorderStyle="None" CssClass="bt_thanhtoan"  />
                         </div>    
                             <asp:Panel ID="Panel1" runat="server" Visible="False">
                                <div id="tt">
                                    <div id="head">
                                        <span>Thông tin nhận hàng</span>
                                    </div>
                                    <div id="noidungtt">
                                        
                                       
                                        <div id=""></div>
                                        <asp:DataList ID="DataList1" runat="server">
                                            <ItemTemplate>
                                                <table class="style1">
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:Label ID="Label4" runat="server" Text="Họ Tên Khách Hàng"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label6" runat="server" Text="Label"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:Label ID="Label5" runat="server" Text="Số Điện Thoại"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label7" runat="server" Text="Label"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:RadioButton ID="RadioButton1" runat="server" Text="Địa chỉ Giao Hàng Cũ" />
                                                        </td>
                                                        <td>
                                                            &nbsp;</td>
                                                        <td>
                                                            <asp:DropDownList ID="DropDownList2" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="3">
                                                            <asp:RadioButton ID="RadioButton2" runat="server" 
                                                                Text="Địa Chỉ Giao Hàng Mới" />
                                                            <asp:Panel ID="Panel2" runat="server">
                                                                
                                                                <table class="style1">
                                                                    <tr>
                                                                        <td>
                                                                            <asp:DropDownList ID="DropDownList3" runat="server">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                        <td>
                                                                            <asp:DropDownList ID="DropDownList4" runat="server">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            &nbsp;</td>
                                                                        <td>
                                                                            &nbsp;</td>
                                                                    </tr>
                                                                </table>
                                                                
                                                            </asp:Panel>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            &nbsp;</td>
                                                        <td>
                                                            &nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            &nbsp;</td>
                                                        <td>
                                                            &nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            &nbsp;</td>
                                                        <td>
                                                            &nbsp;</td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </asp:DataList>
                                        
                                       
                                        
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                </asp:UpdatePanel>
               
            </div><!---End #loaihinhtt--->
        </div><!---End #content--->
    <div class="right_column">
        <div id="SPmuakem" class="SPcunghang">
            <div class="tabgiua">
                <h1>
                    bạn đang cần sản phẩm này</h1>
                <div class="noidung">
                    noi dung</div>
            </div>
            <!--End .tabgiua-->
        </div>
        <!--End #SPmuakem-->
    </div>
    <!--End .cotphai1-->
    <div class="clear"></div>
    </div><!---End #wrapper--->
</asp:Content>
